03 / 03

What are self-closing tags?

Self-Closing Tags in HTML

Self-closing tags (also called void elements) are HTML elements that do not have any content or closing tag. They only consist of a single opening tag and are used for elements where no inner content is needed, such as images or line breaks.

Examples of Self-Closing Tags
Common Self-Closing Tags
  1. 1

    <img> – for images

  2. 2

    <br> – for line breaks

  3. 3<hr> – for horizontal rules
  4. 4

    <input> – for form inputs

  5. 5

    <meta> – for metadata

  6. 6<link> – for linking external resources
  7. 7

    <source> – for media sources

  8. 8

    <area> – for image maps

  9. 9<col> – for table column properties